CX_FRACTION
Class hierarchy
Description:
This class is used to represent fractions.
Code example:
// Bruchzahl Objekt erzeugen
Var(fraction1, fraction2)
CreatePersObject(CX_FRACTION) -> fraction1
CreatePersObject(CX_FRACTION) -> fraction2
"3/9" fraction1 Put
"1/3" fraction2 Put
fraction1 fraction2 + // Ergebnis 2/3
Var(fraction1, fraction2)
CreatePersObject(CX_FRACTION) -> fraction1
CreatePersObject(CX_FRACTION) -> fraction2
"3/9" fraction1 Put
"1/3" fraction2 Put
fraction1 fraction2 + // Ergebnis 2/3
Display on screen
InstantView® Instruction: Fraction
Note: If a fraction is read in, it is checked whether it can be shortened. This means that e.g. the input "10/12" is immediately displayed as "5/6". The separator which separates the numerator and denominator is defined by the location specific data and is normally the character "/".
Operator | Brief description |
---|---|
+, -, *, / | Arithmetic |
+=, -=, *=, /= | Arithmetic |
>, <, = | Compare |
Function | MA* | Parameters | Return | Brief description |
---|---|---|---|---|
Reduce | Shortening the fracture | |||
SetFraction 231532 | STRING, INTEGER | Import fraction from the passed string | ||
Add | CX_AMOUNT | CX_AMOUNT | Operator + as function | |
AddAssign | CX_AMOUNT | Operator += as function | ||
Car format | INTEGER, INTEGER | CX_AMOUNT | Returns a formatted object according to the given number of digits before and after the decimal point (only with CX_VALUE, otherwise the object itself). | |
DivAssign | CX_AMOUNT | Operator /= as function | ||
Divide | CX_AMOUNT | CX_AMOUNT | Operator / as function | |
MulAssign | CX_AMOUNT | Operator *= as function | ||
Multiply | CX_AMOUNT | CX_AMOUNT | Operator * as function | |
string | INTEGER | CX_STRING | Returns the string representation of the object | |
SubAssign | CX_AMOUNT | Operator -= as function | ||
Subtract | CX_AMOUNT | CX_AMOUNT | Operator - as a function |
* MA = Member Access Function
Data field | Type | Reference class | I* | Brief description |
---|
* I = Indexable data field
Module | Brief description |
---|---|